package com.itqf.service.impl;

import com.itqf.service.TbItemService;
import org.springframework.stereotype.Service;

/**
 * @Description:  被代理类
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2021/1/18
 * @Time: 下午4:08
 */
@Service  //默认bean的id就是 首字母小写的类名
public class TbItemServiceImpl implements TbItemService {
    @Override
    public void add(String name) {
        System.out.println("add tbItem......"+name);

        try {
            Thread.sleep(1000);//
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }

    @Override
    public int delete(int id) {
        System.out.println("delete tbItem......"+id);
        try {
            Thread.sleep(3000);//
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return 1;
    }
}
